{% extends 'main.html' %}
{% load i18n %}
{% block content %}
  <div id="detail">
    {% for message in data %}
      <div class="post" >
        <h1>{{message.name|escape}}</h1>
        <h5>{{message.createTime|date:"Y-m-d H:i:s"}}</h5>
        <div class="message">{{message.content|escape|linebreaks}}</div>
        {% if admin %}
          <h4>
                   <a href="/admin/deleteMessage/?id={{message.key.id}}" onClick="return confirm('{% trans "Are you sure?" %}')">
                    {% trans 'Delete' %}
                    </a>
          </h4>
        {% endif %}
      </div>
    {% endfor %}
    <div class="messages">
      <form name="comment" action="/client/addMessage/" method="post">
          <p>		<input type="hidden" name="address" value="" /></p>
			    <p>
				    {% trans "Name" %}:
				    <input name="name" type='text' size="40" />
          </p>
			    <p>
				    {% trans "Content" %}:
          </p>
          <p>
				    <textarea name="content" rows="5" cols="52" ></textarea>
				  </p>
          <p class="subbutton"> 
					<input type='submit' value='{% trans "OK" %}' />
				</p> 
      </form>
    </div>
  </div>
{% endblock content %}
{% block message%}
{% endblock message%}
